<template>
  <div>
    home....
    <h1>{{ name }}</h1>
    <button @click="change">改变张三</button>
    <hr />
    <homechild></homechild>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import homechild from '@/components/homeChildCom.vue'
export default defineComponent({
  components: {
    homechild
  },
  setup() {
    let name = ref('张三')
    const change = function () {
      setTimeout(() => {
        name.value = 'lisi'
      }, 2000)
    }
    return {
      name,
      change
    }
  }
})
</script>
<style lang="less" rel="stylesheet/less" scoped></style>
